/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.servicelayer.gamelogic.manager;

import cz.muni.fi.diplomka.servicelayer.dto.Message;
import java.util.List;

/**
 * Interface for manipulating with Message between Players
 *
 * @author Jakub Kutil
 */
public interface MessageManager {

    /**
     * Create Message
     *
     * @param message Message to create
     */
    public void addMessage(Message message);

    /**
     * Edits Message
     *
     * @param message Message to edit
     */
    public void editMessage(Message message);

    /**
     * Deletes Message
     *
     * @param id Id of Message to delete
     */
    public void deleteMessage(Long id);

    /**
     * Gets Message with specified Id
     *
     * @param id specified Id
     * @return found Message or empty one if not found
     */
    public Message findMessage(Long id);

    /**
     * Gets all Messages sent to specified Player
     *
     * @param playerId Id of specified Player
     * @return list of Messages sent to specified Player
     */
    public List<Message> getAllReceivedMessagesOfPlayer(Long playerId);

    /**
     * Gets all Messages sent by specified Player
     *
     * @param playerId Id of specified Player
     * @return list of Messages sent by specified Player
     */
    public List<Message> getAllSentMessagesOfPlayer(Long playerId);

    /**
     * Gets count of unread recieved Messages of specified Player
     *
     * @param playerId Id of specified Player
     * @return count of unread recieved Messages of specified Player
     */
    public int getCountOfUnreadReceivedMessagesOfPlayer(Long playerId);
}
